package com.refactor.practice;

import com.refactor.practice.movieType.MovieTypeEnum;

import java.util.Vector;

public class Main {
    public static void main(String[] args) {
        Customer customer = new Customer("user1", new Vector());

        addRental(customer, "regular movie", MovieTypeEnum.REGULAR, 3);
        addRental(customer, "new movie", MovieTypeEnum.NEW_RELEASE, 2);
        addRental(customer, "children movie", MovieTypeEnum.CHILDRENS, 5);

        String result = customer.statement();
    }

    private static void addRental(Customer customer, String movieTitle, MovieTypeEnum movieType, int dayRented) {
        Movie movie = new Movie(movieTitle, movieType);
        Rental rental = new Rental(movie, dayRented);
        customer.addRental(rental);
    }
}
